import Mock from 'mockjs2'
import { builder } from '../util'

const pageData = () => {
    return builder({
        total: 99,
        current: 6,
        size: 20,
        records: [{
            'id': 126,
            groupNum: 9,
            todayJoin: 10,
            todayExit: 10,
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'groupCreateTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'groupName': '查看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }, {
            'id': 2,
            groupNum: 9,
            todayJoin: 10,
            todayExit: 10,
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'groupCreateTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'groupName': '！ 点击查看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }, {
            'id': 3,
            groupNum: 9,
            todayJoin: 10,
            todayExit: 10,
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'createdTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'groupName': '的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }, {
            'id': 1005,
            groupNum: 9,
            todayJoin: 10,
            todayExit: 10,
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'groupCreateTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'groupName': '看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }
        ]
    })
}

const pageGroupCustomer = () => {
    return builder({
        total: 99,
        current: 6,
        size: 20,
        records: [{
            'id': 126,
            groupNum: 9,
            todayJoin: 10,
            todayExit: 10,
            type: '费内部成员',
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'groupJoinTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'groupJoinType': '查看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }, {
            'id': 2,
            groupNum: 9,
            todayJoin: 10,
            todayExit: 10,
            type: '内部成员',
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'groupJoinTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'groupJoinType': '！ 点击查看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }, {
            'id': 3,
            groupNum: 9,
            todayJoin: 10,
            todayExit: 10,
            type: '内部成员',
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'groupJoinTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'groupJoinType': '的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }, {
            'id': 1005,
            groupNum: 9,
            todayJoin: 10,
            todayExit: 10,
            type: '内部成员',
            'name': '深度复盘！裂变23级、裂变率97%，苏宁、顺丰日涨万粉背后的操盘秘诀',
            'groupJoinTime': 1603271444032,
            'poster': 'https://xiaoliebian-sys.oss-cn-hangzhou.aliyuncs.com/img/operation/poster/066b58c1a8f84e3b80cfc303a67114d3.jpg',
            'groupJoinType': '看他们的涨粉秘诀吧 ↑↑↑',
            'url': 'https://mp.weixin.qq.com/s/OI8mtDo4SeWa5fBCWyQ_dQ'
        }
        ]
    })
}
const checkRunningSyncGroup = () => {
    return builder({
        remaining: null,
        synchronizing: false
    })
}
const getGroupInfo = () => {
    return builder({
        name: 'mockSop',
        groupName: '杨晶',
        groupContent: '弱小无助',
        groupUserNum: 3,
        todayJoin: 1,
        todayExit: 1
    })
}
const changeStatus = () => {
    return builder('操作成功')
}
Mock.mock(/\/qw\/group\/syncGroup/, 'get', changeStatus)
Mock.mock(/\/qw\/group\/checkRunningSyncGroup/, 'get', checkRunningSyncGroup)
Mock.mock(/\/qw\/group\/pageGroupCustomer/, 'get', pageGroupCustomer)
Mock.mock(/\/qw\/group\/getGroupInfo/, 'get', getGroupInfo)
Mock.mock(/\/qw\/group\/pageGroup/, 'get', pageData)
Mock.mock(/\/qw\/group\/importGroup/, 'get', changeStatus)
